array-some
Array#some ponyfill for older browsers
Ponyfill: A polyfill that doesn't overwrite the native method
DESCRIPTION
Provides some
function for older browsers, use native implememtation if exists.
It's just like
EXAMPLE
var some = require('array-some');
function isBiggerThan10 (element, index, array) {
return element > 10;
}
some([2, 5, 8, 1, 4], isBiggerThan10);
some([12, 5, 8, 1, 4], isBiggerThan10);
INSTALL
via npm
Install
$ npm install --save array-some
Use
var some = require('array-some');
via bower
Install
$ bower install --save array-some
Load (some
function is exported)
<script type="text/javascript" src="./path/to/bower_components/array-some/build/array-some.js"></script>
Use
var result = some([2, 5, 8, 1, 4], function (element, index, array) {
return element > 10;
});
AUTHOR
LICENSE
Licensed under the MIT license.